package mapping

import (
	"simcard/model"
	"simcard/model/entity"
)

// SimCardRechargeRecordsEntityToDto entity data transfer
func SimCardRechargeRecordsEntityToDto(simCardRechargeRecords []*entity.SimCardRechargeRecord) []*model.SimCardRechargeRecordInfo {
	out := make([]*model.SimCardRechargeRecordInfo, 0, len(simCardRechargeRecords))
	for _, c := range simCardRechargeRecords {
		out = append(out, SimCardRechargeRecordEntityToDto(c))
	}
	return out
}

// SimCardRechargeRecordEntityToDto entity data transfer
func SimCardRechargeRecordEntityToDto(e *entity.SimCardRechargeRecord) *model.SimCardRechargeRecordInfo {
	return &model.SimCardRechargeRecordInfo{

		Id: e.Id,

		EbikeId: e.EbikeId,

		CardId: e.CardId,

		AgentId: e.AgentId,

		PrepaidId: e.PrepaidId,

		AgentDetail: e.AgentDetail,

		Iccid: e.Iccid,

		RechargeAt: e.RechargeAt,

		Status: e.Status,

		Reason: e.Reason,

		CreatedAt: e.CreatedAt,

		UpdatedAt: e.UpdatedAt,
	}
}
